package test_package;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

import java.util.concurrent.TimeUnit;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 22.11.13
 * Time: 13:23
 * To change this template use File | Settings | File Templates.
 */
public class buxfer_com_PO_SignupPage {
    private static WebDriver driver;

    public buxfer_com_PO_SignupPage (WebDriver driver){
        this.driver = driver;
    }

    public buxfer_com_PO_AccountPage registerAccount(String login, String password){
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
        driver.findElement(By.id("signupEmail")).sendKeys(login);
        driver.findElement(By.id("signup_password")).sendKeys(password);
        driver.findElement(By.xpath("//a[contains(text(),'Create Account')]")).click();
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
        return new buxfer_com_PO_AccountPage(driver);
    }
}
